<? use_helper("form", "object") ?>

<h2>Cerere</h2>

<?=form_tag("main/cerere", "id=form-cerere")?>
<? if ((isset($cerere)) && ($cerere instanceof Cerere)): ?>
  <? input_hidden_tag('cerere[id]', $cerere->getId()) ?>
<? endif; ?>
<?=submit_tag("salveaza")?>
<a href="<?=url_for("main/cerere")?>#anuleaza" class="ajax" title="anuleaza sesiunea">anuleaza</a>
<ul>
  <li>
    <label for="cerere_client_id">Client</label>
    <?=object_select_tag($cerere, 'getClientId', 'name=cerere[client_id] id=cerere_client_id  class=cerere-client', $sf_user->getAttribute('cerere[client_id]'))?>
  </li>
  <li>
    <label for="cerere_pret_tinta">Pret tinta</label>
    <?=object_input_tag($cerere, 'getPretTinta', 'name=cerere[pret_tinta] id=cerere_pret_tinta class=produs-pret-tinta', $sf_user->getAttribute('cerere[pret_tinta]'))?>
  </li>
  <li>
    <label for="cerere_data_limita">Data limita</label>
    <?=object_input_tag($cerere, 'getDataLimita', 'name=cerere[data_limita] id=cerere_data_limita class="data produs-data-limita"', $sf_user->getAttribute('cerere[data_limita]'))?>
  </li>
  <li>
    <label for="cerere_data_limita">Mentiuni</label>
    <?=object_textarea_tag($cerere, 'getNote', 'name=cerere[note] id=cerere_note class=cerere-note', $sf_user->getAttribute('cerere[note]'))?>
  </li>
  <li class="produse">
    <table cellpadding=0 cellspacing=0>
      <tr>
        <td>&nbsp;</td>
        <td colspan="8">
          <h2>Produse</h2>
        </td>
      </tr>
      <tr class="produse-sus">
        <td>&nbsp;</td>
        <td>nume</td>
        <td>standard</td>
        <td>cod</td>
        <td>material</td>
        <td>dimensiune</td>
        <td>cantitate</td>
        <td>tip de furnizori</td>
        <td style="width: 100px;">&nbsp;</td>
      </tr>
      <? foreach($randuri as $i=>$rand):?>
        <?=$rand?>
      <? endforeach; ?>
    </table>
  </li>
</ul>
</form>